const fs = require('fs')
module.exports = (err) => {
    // 错误了就将日志中最后的那个ok改成404
    let log = fs.readFileSync('./logs/ordermeal.log', 'utf-8')
    log = log.replace(/ok$/, err)
    fs.writeFileSync('./logs/ordermeal.log', log)
}